<template>
    <div>
        <h1>hongyi页面</h1>
        <h3>(15)$表示vue自己的数据</h3>
        <h3>注意: 区别vue数据和model数据！！！！</h3>
        <button @click="m">按钮</button>
    </div>
</template>


<script>
export default {
       name:"hongyi",
        data() {
            return {
                name:"hongyi",
                data:'小马哥',
                person:[{name:"hongyi", age:12}],
                student:{name:"小马哥", age:12}
            }
        },
        methods: {
            m(){
                console.log(this.name);
                console.log(this.$data.name);
                console.log(this.data);
                console.log(this.$data.data);
                console.log(this.person[0].name);// 集合是先去遍历再点对象
                console.log(this.student.name); // 对象是直接点
                console.log(this.$data.student.name);
            }
        },
}
</script>

<style>

</style>